package com.mdlaser.controller;

import cn.dev33.satoken.annotation.SaIgnore;
import com.mdlaser.annotation.CommonRest;
import com.mdlaser.dto.Commodity;
import com.mdlaser.service.IWishTypeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author mdlaser
 * @since 2024-05-16
 */
@RestController
@RequestMapping("/commodity")
@CommonRest
@Tag(name = "祝福模板")
public class CommodityController {

    @Autowired
    IWishTypeService wishTypeService;

    @Operation(summary = "获取祝福模板，树形列表")
    @GetMapping("/list")
    @SaIgnore
    public List<Commodity> getCommodity() {
        return wishTypeService.getCommodity();
    }

}
